import VueMeta from 'vue-meta'
import TreeSelect from '@riophae/vue-treeselect'
import tab from './tab'
import cache from './cache'
import * as modal from './modal'
import download from './download'
import Element from 'element-ui'

import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import '@/assets/styles/element-variables.scss'
import '@/assets/styles/index.scss' // global css
import '@/assets/styles/normal.scss' // normal css
import '@/assets/icons' // svg icons

export default {
  install(Vue) {
    // 全局引入Element ui
    Vue.use(Element, {
      size: cache.local().get('vv__element_size', 'medium')
    })
    // 头部标签组件
    VueMeta.install(Vue)
    //树形下拉
    Vue.component('TreeSelect', TreeSelect)
    // 页签操作
    Vue.prototype.$tab = tab
    // 缓存对象
    Vue.prototype.$cache = cache
    // 模态框对象
    Vue.prototype.$modal = modal
    // 下载文件
    Vue.prototype.$download = download
  }
}
